<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<!--[if IE]>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<![endif]-->
<title>登录</title>
<!-- BOOTSTRAP CORE STYLE  -->
<link href="__STATIC__/index/css/bootstrap.css" rel="stylesheet" />
<!-- FONT AWESOME STYLE  -->
<link href="__STATIC__/index/css/font-awesome.css" rel="stylesheet" />
<!-- CUSTOM STYLE  -->
<link href="__STATIC__/index/css/style.css" rel="stylesheet" />
<script src="__STATIC__/index/js/jquery.min.js"></script>
</head>
<body>
<div class="navbar navbar-inverse set-radius-zero" style="min-height:50px;">
	<div class="container">
		<div class="navbar-header" style="padding:0">
			<div class="navbar-brand" style="float:right;">
				<a href="javascript:void(0)" style="font-size: 13px;">欢迎登录</a>
			</div>
			<a class="navbar-brand" href="{:url('index/index/index')}"style="padding:0">
				<img src="__STATIC__/index/logo.jpg" style="width:30px;height:30px;margin:0px 0px;position:relative;top:10px;left:4px;" />
			</a>
			<span id="game-title" style="float: left;margin-left: 10px;margin-top:10px;font-size: 13px;">冠军投资 &nbsp;<a href="{:url('index/index/index')}" style="font-size: 13px;">首页</a>&nbsp;&nbsp;</span>         
			<!-- <a href="#" class="btn btn-danger pull-right">LOG ME OUT</a> -->
		</div>

		<!-- <div class="right-div">
			<a href="#" class="btn btn-danger pull-right">LOG ME OUT</a>
		</div> -->
	</div>
</div>
<section class="footer-section"style="padding-left:18px;padding-right:18px">
	<div class="container" style="width:100%;padding:0 2px;">
		<div class="row"  style="text-align:left;">
			<div class="col-md-6 col-sm-6 col-xs-12">
               <div class="panel panel-info">
                    <div class="panel-heading">
                       登录
                    </div>
                    <div class="panel-body">
                            <div class="form-group">
                                <label>用户名</label>
                                <input class="form-control" type="text" name="username" required id="username">
                            </div>
                            <div class="form-group">
                                <label>密码</label>
                                <input class="form-control" type="password" name="password" required id="password">
                            </div>
                            <button type="submit" class="btn btn-info btns">登录 </button>
                            <a href="{:url('index/register/index')}" style="color:blue;">没有账号,去注册</a>     
                    </div>
                </div>
            </div>
		</div>
	</div>
</section> 
<!-- form SECTION END-->

  <!-- FOOTER SECTION END-->
<!-- JAVASCRIPT FILES PLACED AT THE BOTTOM TO REDUCE THE LOADING TIME  -->
<!-- CORE JQUERY  -->
<!-- BOOTSTRAP SCRIPTS  -->

</body>
</html>
<script type="text/javascript">
	$(".btns").click(function(){
         var username = $("#username").val();
         var password = $("#password").val();
         $.post('{:url('index/login/login')}',{username:username,password:password},function(data){
               if(data == 1){
                   location.href="{:url('index/index/index')}";
               }else if(data == 605){
               	   alert('用户名或者密码错误');
               }else{
               	   alert('登录失败');
               }
         });
	});
</script>